//风向换算
export function wind_Direction(type) {
    let data = [];
    if (type == 0) {
        data = ['东北偏北', '0X0000']
    } else if (type == 1) {
        data = ['东北', '0x0001']
    } else if (type == 2) {
        data = ['东北偏东', '0X0002']
    } else if (type == 3) {
        data = ['正东', '0X0003']
    } else if (type == 4) {
        data = ['东南偏东', '0X0004']
    } else if (type == 5) {
        data = ['东南', '0X0005']
    } else if (type == 6) {
        data = ['东南偏南', '0X0006']
    } else if (type == 7) {
        data = ['正南', '0X0007']
    } else if (type == 8) {
        data = ['西南偏南', '0X0008']
    } else if (type == 9) {
        data = ['西南', '0X0009']
    } else if (type == 10) {
        data = ['西南偏西', '0X000A']
    } else if (type == 11) {
        data = ['正西', '0X000B']
    } else if (type == 12) {
        data = ['西北偏西', '0X000C']
    } else if (type == 13) {
        data = ['西北', '0X000D']
    } else if (type == 14) {
        data = ['西北偏北', '0X000E']
    } else if (type == 15) {
        data = ['正北', '0X000F']
    }
    return data;
}

//风速-风力换算
export function wind_Force(type) {
    let data;
    if (0 <= type && type<= 0.2) {
        data = 0;
    } else if (0.2 < type && type <= 1.5) {
        data = 1;
    } else if (1.5 < type && type <= 3.3) {
        data = 2;
    } else if (3.3 < type && type <= 5.4) {
        data = 3;
    } else if (5.4 < type && type <= 7.9) {
        data = 4;
    } else if (7.9 < type && type <= 10.7) {
        data = 5;
    } else if (10.7 < type && type <= 13.8) {
        data = 6;
    } else if (13.8 < type && type <= 17.1) {
        data = 7;
    } else if (17.1 < type && type <= 20.7) {
        data = 8;
    } else if (20.7 < type && type <= 24.4) {
        data = 9;
    } else if (24.4 < type && type <= 28.4) {
        data = 10;
    } else if (28.4 < type && type <= 32.6) {
        data = 11;
    } else if (32.6 < type && type <= 36.9) {
        data = 12;
    } else if (36.9 < type && type <= 41.4) {
        data = 13;
    } else if (41.4 < type && type <= 46.1) {
        data = 14;
    } else if (46.1 < type && type <= 50.9) {
        data = 15;
    } else if (50.9 < type && type <= 56.0) {
        data = 16;
    } else if (56.0 < type && type <= 61.2) {
        data = 17;
    } else if (61.5 < type) {
        data = 18;
    }
    return data;
}